<?php

class DBMOrdenatorTranslator implements DBMTranslator {
	public static function translateToSQLServer($translatable, $command = null){
		if($translatable->getMode() == DBMOrdenator::ORDER_MODE_ASC){
			return $translatable->getField() . " ASC";
		} else {
			return $translatable->getField() . " DESC";
		}
	}
	public static function translateToMySQL($translatable, $command = null){
		if($translatable->getMode() == DBMOrdenator::ORDER_MODE_ASC){
			return $translatable->getField() . " ASC";
		} else {
			return $translatable->getField() . " DESC";
		}
	}
	public static function translateToPostgreSQL($translatable, $command = null){
		if($translatable->getMode() == DBMOrdenator::ORDER_MODE_ASC){
			return $translatable->getField() . " ASC";
		} else {
			return $translatable->getField() . " DESC";
		}	
	}
}

?>